<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
	<title>案例管理</title>
	<script src="${ctx}/static/jquery-sortable/ui.core.js" type="text/javascript"></script>
	<script src="${ctx}/static/jquery-sortable/ui.sortable.js" type="text/javascript"></script>
	<link href="${ctx}/static/jquery-sortable/css/base.css" type="text/css" rel="stylesheet" />
	<link href="${ctx}/static/jquery-sortable/css/demos.css" type="text/css" rel="stylesheet" />
	<link href="${ctx}/static/jquery-sortable/css/common.css" type="text/css" rel="stylesheet" />
	<link href="${ctx}/static/jquery-sortable/css/yj.css" type="text/css" rel="stylesheet" />
	<link href="${ctx}/static/jquery-sortable/css/jquery.tab.css" type="text/css" rel="stylesheet" />
	<link rel="stylesheet" href="${ctx}/static/plugin/bootstrap/css/bootstrap.min.css"  />
<link rel="stylesheet" href="${ctx}/static/plugin/style.css"  />
	<script type="text/javascript">
	$(document).ready(function(){
		getFrameHeight();
	});
	
</script>
<style type="text/css">
</style>
</head>
<body>
         	<div>
                 <div id="jCrumbs" class="breadCrumb module">
   					<ul>
				        <li>
				            <a href="#"><i class="icon-home" style="margin-top: 2px;"></i></a>
				        </li>
				        <li>
				            	案例管理
				        </li>
				         <li>
				            <a href="${ctx}/cases/cases">案例列表</a>
				        </li>
				        
						<c:if test="${audit==1}">
					        <li>
					            	案例审核
					        </li>
				        </c:if>
				        <c:if test="${audit!=1}">
				        	<li>
					            	案例预览
					        </li>
				        </c:if>
				    </ul>
				</div>					                    
			<div class="row-fluid">
			<div style="float:right">
				<button class="btn" type="button"  onclick="back()">返 回</button>
			</div>	
			<c:if test="${audit==1}">
			<div class="span12">
       		<h3 class="heading">案例信息</h3>
				<div class="row-fluid">
				<div class="span8">
						<form:form id="inputForm" name="inputForm" modelAttribute="resources" cssClass="form-horizontal"
								action="${ctx}/cases/cases/auditCases" method="post" enctype="multipart/form-data">
								<input type="hidden" name="casesId" id="casesId" value="${cases.casesId}"/>
						<fieldset>
							<div class="control-group formSep">
								<label for="u_signature" class="control-label">审核意见:</label>
								<div class="controls">
									<textarea rows="4" id="auditDesc" name="auditDesc" class="input-xlarge">${cases.auditDesc}</textarea>
									<span class="help-block">请输入审核意见</span>
								</div>
							</div>
							<div class="control-group formSep">
								<label class="control-label">是否通过</label>
								<div class="controls">
									<label class="radio inline">
										<input type="radio" value="1" id="auditType" name="auditType" checked="checked" />
										通过
									</label>
									<label class="radio inline">
										<input type="radio" value="2" id="auditType" name="auditType" />
										不通过
									</label>
								</div>
							</div>
							<div class="control-group">
								<div class="controls">
									<button class="btn btn-gebo" type="submit">保 存</button>
								</div>
							</div>
						</fieldset>
					</form:form>
					</div>
				</div>
   			</div>
   			</c:if>
   			<div class="span12">
					<div id="d" >
				       <div class="content">
						<div class="conTitle"><img src="${ctx}/static/jquery-sortable/image/icon_11.png" />&nbsp;&nbsp;查看案例&nbsp;&nbsp;&nbsp;${info}</div>
						<table width="100%" border="0"  cellspacing="0" cellpadding="0" class="stripe_tb">
							<tr>
								案例标题:&nbsp;<strong>${cases.casesTitle}</strong>
							</tr>
							<tr>
								 <div class="control-group formSep">
									<label for="u_fname" class="control-label"><font color="red">*</font>案例封面:</label>
                					<div class="controls">
                					<img id="preview" width="440px" ';
                					src="${ctx}/cases/cases/viewPhoto/${cases.casesId}"/>
									</div>
								</div>
							</tr>
							<tr>
							<strong>案例内容</strong>
							</tr>
							<tr>
								<td colspan="2">
							        <c:forEach items="${cases.casesInfoList}" var="infoContent" varStatus="info">
										<div id="frame<c:out value="${info.index }"/>" class="frameDiv ui-state-default" style="font-size: 12px; width: 440px;">
												<c:if test="${infoContent.imgCasesContent!=null}">
													<div class="imgArea" style="width: 440px; text-align: left; border: 0;">
														<img src="${ctx}/cases/resources/viewPhoto/${infoContent.imgCasesContent.resourcesId}" align="top"  />
													</div>
												</c:if>
												<c:if test="${infoContent.txtCasesContent!=null}">
													<div class="txtArea" style="width: 500px; text-align: left; border: 0;">
														<%
															request.setAttribute("x_n", "\n");
														%>
														${fn:replace(infoContent.txtCasesContent.resContentStr,x_n,'<br>')}
													</div>
												</c:if>
												<div class="curFrameTxt" style="margin-right:-6px;"><font size='4' color='#3C88D6'>第</font>${infoContent.casesFramenum }</div>
										</div>
									</c:forEach>
								</td>
							</tr>
						</table>
				      </div>
				</div>
    			</div>
			</div>
         </div>
</body>
</html>
